import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

import javax.xml.parsers.SAXParser;
import java.io.File;
import java.util.List;

public class wx {
    public static void main(String[] args) throws DocumentException {
        SAXReader saxReader = new SAXReader();
        Document document = saxReader.read(new File("D:\\童老师资料作业\\1.32期共享\\作业\\day16\\素材\\annotation\\src\\wxzf.xml"));


        Element rootElement = document.getRootElement();

        List<Element> bean = rootElement.elements();
        if (bean == null||bean.size()==0){
            return;
            }
        for (Element element : bean) {
            if (element==null){
                continue;
        }

            System.out.println(element.getName()+":"+element.getText());
            }
        }


    }

